package ua.kyivenergo.cableLines.data.attributes;

/**
 * Created by Alex Kebkalo (kebka@mail.ru) on 24.04.14.
 */
public class BinaryAttribute extends Attribute {
    private int attributeId;
    private int partNumber;

    public BinaryAttribute(int attributeId, int partNumber, String description) {
        super(description);
        this.attributeId = attributeId;
        this.partNumber = partNumber;
    }

    @Override
    public int getAttributeType() {
        return AttributeTypes.BinaryAttribute;
    }

    @Override
    public String toString() {
        return String.format("<a href=\"/get_file?id=%d\" target=\"_blank\">часть %d</a>", attributeId, partNumber);
    }
}
